package librecalcdataproxy.client;

import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 *
 * @author Wiktor Toporek
 */
public class CellValue implements Serializable, Remote {
    private String signature = "CellValueObj";
    
    
    public enum CELL_VALUE_TYPE {
        DOUBLE, STRING, UNKNOWN
    }
    public CELL_VALUE_TYPE valueType;
    public String strValue;
    public Double dblValue;
    public CellValue() throws RemoteException {     
        strValue = "";
        dblValue = 0.0;
        valueType = CELL_VALUE_TYPE.UNKNOWN;
    }
    public CellValue(Double val) throws RemoteException {
        this.dblValue = val;
        this.strValue = Double.toString(val);
        this.valueType = CELL_VALUE_TYPE.DOUBLE;
    }
    public CellValue(String val) throws RemoteException {
        this.dblValue = 0.0;
        this.strValue = val;
        this.valueType = CELL_VALUE_TYPE.STRING;
    }
    
}
